package com.victor.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.victor.dao.BannerDao;
import com.victor.entity.Banner;
import com.victor.service.BannerService;

@Service
public class BannerServiceimpl implements BannerService {

	@Autowired
	private BannerDao bannerDao;

	// 获取所有banner
	@Override
	public List<Banner> getAllBanner() {
		return bannerDao.getAll();
	}

	// 修改banner
	@Override
	public boolean updateBanner(Banner banner) {
		return bannerDao.update(banner) > 0 ? true : false;
	}
}
